//
//  HXLCityModel.m
//  On The Load
//
//  Created by 晓琳 on 15/11/9.
//  Copyright © 2015年 @@叶一闽. All rights reserved.
//

#import "HXLCityModel.h"
#import "HXLLeavesModel.h"

@implementation HXLCityModel

- (void) setValue:(id)value forUndefinedKey:(NSString *)key {
    //给数组中的小Model赋值
    if ([key isEqualToString:@"leaves"]) {
        
            self.leavesArray = [NSMutableArray array];
            
            NSArray *array = value;
            
            for (NSDictionary *dic in array) {
                HXLLeavesModel *model = [[HXLLeavesModel alloc] init];
                
                [model setValuesForKeysWithDictionary:dic];
                [self.leavesArray addObject:model];
                
            }
    }

}
@end
